package com.aspose.cells;

import java.util.ArrayList;

class zafa extends zaep {
   private String b;
   private int c;

   public static boolean a(char var0) {
      return "\t\n\r".indexOf(var0) != -1;
   }

   private void h() {
      while(!this.i()) {
         if (!a(this.j())) {
            return;
         }

         ++this.c;
      }

   }

   private boolean i() {
      return this.c >= this.b.length();
   }

   public ArrayList e() {
      this.b = com.aspose.cells.b.a.zv.a(this.b, "&quot;", "");
      String var1 = "";
      String var2 = "";

      while(!this.i()) {
         var1 = this.f();

         for(var2 = this.g(); !var1.equals("") && !var2.equals(""); var2 = this.g()) {
            this.a(var1, var2);
            var1 = this.f();
         }
      }

      return this.d();
   }

   public String f() {
      StringBuilder var1 = new StringBuilder();
      this.h();

      while(!this.i()) {
         if (this.j() == ':') {
            ++this.c;
            break;
         }

         if (this.j() == ';') {
            this.c -= com.aspose.cells.b.a.zr.a(var1).trim().length();
            return "";
         }

         var1.append(this.j());
         ++this.c;
      }

      this.h();
      return com.aspose.cells.b.a.zr.a(var1).trim();
   }

   public String g() {
      StringBuilder var1 = new StringBuilder();
      this.h();

      while(!this.i()) {
         if (this.j() == ';') {
            ++this.c;
            break;
         }

         var1.append(this.j());
         ++this.c;
      }

      return com.aspose.cells.b.a.zr.a(var1).trim();
   }

   public void a(String var1, String var2) {
      zaeo var3 = new zaeo(var1, var2);
      this.a(var3);
   }

   private char j() {
      return this.a((int)0);
   }

   private char a(int var1) {
      return this.c + var1 < this.b.length() ? this.b.charAt(this.c + var1) : '\u0000';
   }

   public void b(String var1) {
      if (var1.startsWith("'") && var1.endsWith("'")) {
         this.b = var1.substring(1, 1 + (var1.length() - 2));
      } else {
         this.b = var1;
      }

   }
}
